﻿using System.Reflection;
using Autofac;
using Module = Autofac.Module;
using Autofac.Configuration;

namespace Data
{
    public class DataModule : Module
    {
        protected override void Load(ContainerBuilder builder)
        {
            builder.RegisterGeneric(typeof(IRepository<>)).As(typeof(IRepository<>)).InstancePerDependency();
            builder.RegisterModule(new ConfigurationSettingsReader("autofac"));
        }

    }
}